home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
U-Utilities
/
(c)u2.d64
/
dos in basic.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
77 lines
6 POKE53281,0:POKE53280,11
10 GOSUB10021
20 PRINT:IFPEEK(828)<>77THENPOKE828,77:A$="$":PRINT"[147]";:GOTO35
30 POKE198,1:POKE631,29:PRINT"[196][207][211]: [148]"CHR$(34)CHR$(34)CHR$(20)"[157]";:INPUT#9,A$
31 PRINTCHR$(13)"[145][145]"
33 IFA$="[196][207][211]"THENPOKE198,1:POKE631,13:PRINT"[196][207][211]: ";:INPUT#9,A$:GOTO31
34 PRINT"";
35 IFA$=""THEN510
36 IFLEFT$(A$,1)="W"THEND=VAL(MID$(A$+"8",2,1)):SAVE"0:DOS IN BASIC",D:RUN
37 IFA$="X"ORA$="Q"THENCLR:POKE828,0:LIST6789-
40 PRINT:IFLEFT$(A$,1)<>"$"THEN200
50 OPEN1,8,0,A$:GET#1,A$,A$:IFA$=""THEN500
55 IFPEEK(788)=49THENPOKE788,52
60 GET#1,A$,A$,A$,B$:IFST=0THENPRINTASC(A$+Z$)+256*ASC(B$+Z$);
65 IFSTTHEN120
70 GET#1,A$,B$,C$,D$,E$,F$,G$,H$,I$,J$,K$,L$,M$,N$,O$,P$,Q$,R$,S$,T$,U$,V$,W$,X$,Y$,Z$
80 PRINTA$B$C$D$E$F$G$H$I$J$K$L$M$N$O$P$Q$R$S$T$U$V$W$X$Y$Z$;
90 IFZ$<>""THENGET#1,A$,Z$:PRINTA$Z$;:GOTO90
95 Z$=CHR$(0)
100 GETA$:IFA$=""THEN110
101 IFA$=""THEN120
105 GETA$:IFA$=""THEN105
106 IFA$=""THEN120
110 IFST=0THENPRINT:GOTO60
120 CLOSE1:IFPEEK(788)=52THENWAIT56321,128:POKE788,49
125 IFA$=""THENRUN
130 PRINT"[217]OU MAY MOVE THE CURSOR TO A [196][201][210][197][195][212][207][210][217]
131 [153]"LINE AND PRESS (null)VAL(null)(null)(null)(null) TO (null)(null)ATNSTR$ OR (null)(null)(null)
132 PRINT"OR PUT S,R OR C AT LEFT TO [211][195][210][193][212][195][200],
133 [153]"(null)VAL(null)ATN(null)VAL, OR LEN(null)(null)(null) THAT FILE.";
140 [138]
200 P$[178][201](A$,3):[139]P$[179][177]"PRG"[175]P$[179][177]"SEQ"[175]P$[179][177]"REL"[167][152]15,A$:[138]
205 [153]"LOAD":[129]I[178]1[164][195](A$):[139][202](A$,I,1)[179][177][199](34)[167][130]:[137]399
210 S[178]I[170]1:[129]I[178]S[164][195](A$):[139][202](A$,I,1)[179][177][199](34)[167][130]
220 N$[178][202](A$,S,I[171]S):C$[178][200](A$,1):[139]C$[179][177]"^"[175]C$[179][177]"/"[175][197](C$)[178]0[167]250
230 [139]P$[179][177]"PRG"[167][153]A$:[153]"NOT PROGRAM":[138]
240 [153]"LOAD"[199](34)N$[199](34)",8"
241 [153]"LOAD"[199](34)N$[199](34)",8,3RETURN";
242 [153]"PRESS RETURNWAIT TO LOAD "[199](34)N$[199](34)
243 [153]"OR SHIFTWAIT+RUN/STOPWAIT TO LOAD & RUN"
244 [153]"FOR MACHINE LANGUAGE PROGRAMS --
245 PRINT"PRESS SHIFT[146]+RETURN[146] THEN PRESS RETURN[146]
246 [153]"TO BLOAD "[199](34)N$[199](34)"";:[151]828,0:[128]
250 [143] PROCESS SPECIAL COMMANDS
251 [139]C$[178]"S"[167][153]"SCRATCH: "N$:[133]"OK YCMDCMDCMD";A$:[139]A$[178]"Y"[167]A$[178]C$[170]":"[170]N$:[137]200
260 [139]C$[178]"R"[167][153]"RENAME: "N$:[153]"TO: ";:[132]9,A$:A$[178]C$[170]":"[170]A$[170]"="[170]N$:[137]200
270 [139]C$[178]"C"[167][153]"COPY: "N$:[153]"TO: ";:[132]9,A$:A$[178]C$[170]":"[170]A$[170]"="[170]N$:[137]200
399 [153]A$:[153]"COMMAND REJECTED.":[138]
500 [153]"ERROR:"
510 [132]15,A$,B$,C$,D$:[153]A$","B$","C$","D$:[160]1:[138]
10000 "GOSUBLOADSYS
10020 "[208]ROGRAM: ""[196][207][211] [201][206] [194][193][211][201][195]"
10021 GOTO10123:"
10025 "
10030 "[193]UTHOR: [196]ON [204]EKEI
10035 "
10036 "
10040 "(null)HIS PROGRAM IS PROVIDED COURTESY OF:
10045 "
10050 " (null)OLIDUS RIGHT$NTERNATIONAL LENORPORATION
10060 " [211]UITE #5, 144 [215]EST 15TH [211]TREET
10070 " (null)ORTH (null)ANCOUVER, PEEK.LEN., LENATN(null)ATNSTR$ATN
10075 " [208]HONE: (604)984-0477
10080 "
10090 "[212]O GET THE [205][193][216][201][205][213][205] USE OUT OF YOUR NEW
10100 "LENOMMODORE-64 COMPUTER AND 1541 DISK
10110 "DRIVE, WE RECOMMEND USING:
10123 Z$[178][199](0):[143]"GOSUBONCLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSEON
10124 OPEN15,8,15:REM"[141][145][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][145]
10125 [159]9,0:[143]"GOSUBONCLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSEON
10126 RETURN:REM"[141][145][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][145]
10130 "GOSUB *** (null)(null)(null)(null)VAL(null) ***
10135 "
10140 " ""(null)HE (null)LTIMATE (null)ROGRAM (null)ANIPULATION
10150 " [211]YSTEM FOR [195]OMMODORE [205]ICROCOMPUTERS."
10170 "[141][158][206]OW AVAILABLE AT YOUR [195]OMMODORE DEALER.[153]